package com.itheima.mapper;

import com.itheima.pojo.MemberTOD;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

@Mapper
public interface MemberDao {


    @Select("select id from t_member where name = #{name} and phoneNumber=#{telephone}")
    Long findMemberIdByIdCard(String name, String telephone);

    @Select("select phoneNumber from t_member where phoneNumber = #{telephone}")
    String getTelephone(String telephone);

    @Insert("insert into t_member(phoneNumber,regTime) values(#{telephone},#{date})")
    void register(String telephone, Date date);
}
